#include "gamekit/sdl/SDLSurface.h"

#ifdef __WIN32__
#include <SDL.h>
#else
#include <SDL/SDL.h>
#endif

using namespace gamekit::sdl;

SDLSurface::SDLSurface(SDL_Surface* surface)
	: m_surface(surface)
{
}

SDLSurface::~SDLSurface()
{
	SDL_FreeSurface(m_surface);
	m_surface = NULL;
}

uint SDLSurface::w(void) const
{
	return m_surface->w;
}

uint SDLSurface::h(void) const
{
	return m_surface->h;
}

SDL_PixelFormat* SDLSurface::format() const
{
	return m_surface->format;
}

SDL_Surface* SDLSurface::surface() const
{
	return m_surface;
}
